export const industries = {
  level0: [
    { label: '计算机/互联网/通信/电子', id: 0 },
    { label: '政府/非营利组织/其他', id: 1 },
    { label: '能源/环保/化工', id: 2 },
    { label: '物流/运输', id: 3 },
    { label: '服务业', id: 4 },
    { label: '专业服务/教育/培训', id: 5 },
    { label: '房地产/建筑', id: 6 },
    { label: '广告/媒体', id: 7 },
    { label: '制药/医疗', id: 8 },
    { label: '贸易/消费/制造/营运', id: 9 },
    { label: '会计/金融/银行/保险', id: 10 },
  ],
  level1: [
    [
      { label: '计算机软件', pid: 0, industry_code: '0000' },
      { label: '计算机硬件', pid: 0, industry_code: '0001' },
      { label: '计算机服务(系统、数据服务、维修)', pid: 0, industry_code: '0002' },
      { label: '通信/电信/网络设备', pid: 0, industry_code: '0003' },
      { label: '通信/电信运营、增值服务', pid: 0, industry_code: '0004' },
      { label: '互联网/电子商务', pid: 0, industry_code: '0005' },
      { label: '网络游戏', pid: 0, industry_code: '0006' },
      { label: '电子技术/半导体/集成电路', pid: 0, industry_code: '0007' },
      { label: '仪器仪表/工业自动化', pid: 0, industry_code: '0008' },
    ],
    [
      { label: '政府/公共事业', pid: 1, industry_code: '0100' },
      { label: '非营利组织', pid: 1, industry_code: '0101' },
      { label: '农/林/牧/渔', pid: 1, industry_code: '0102' },
      { label: '多元化业务集团公司', pid: 1, industry_code: '0103' },
    ],
    [
      { label: '石油/化工/矿产/地质', pid: 2, industry_code: '0200' },
      { label: '采掘业/冶炼', pid: 2, industry_code: '0201' },
      { label: '电气/电力/水利', pid: 2, industry_code: '0202' },
      { label: '新能源', pid: 2, industry_code: '0203' },
      { label: '原材料和加工', pid: 2, industry_code: '0204' },
      { label: '环保', pid: 2, industry_code: '0205' },
    ],
    [
      { label: '交通/运输/物流', pid: 3, industry_code: '0300' },
      { label: '航天/航空', pid: 3, industry_code: '0301' },
    ],
    [
      { label: '餐饮业', pid: 4, industry_code: '0400' },
      { label: '酒店/旅游', pid: 4, industry_code: '0401' },
      { label: '娱乐/休闲/体育', pid: 4, industry_code: '0402' },
      { label: '美容/保健', pid: 4, industry_code: '0403' },
      { label: '生活服务', pid: 4, industry_code: '0404' },
    ],
    [
      { label: '专业服务(咨询、人力资源、财会)', pid: 5, industry_code: '0500' },
      { label: '外包服务', pid: 5, industry_code: '0501' },
      { label: '检测，认证', pid: 5, industry_code: '0502' },
      { label: '法律', pid: 5, industry_code: '0503' },
      { label: '教育/培训/院校', pid: 5, industry_code: '0504' },
      { label: '学术/科研', pid: 5, industry_code: '0505' },
    ],
    [
      { label: '房地产', pid: 6, industry_code: '0600' },
      { label: '建筑/建材/工程', pid: 6, industry_code: '0601' },
      { label: '家居/室内设计/装潢', pid: 6, industry_code: '0602' },
      { label: '物业管理/商业中心', pid: 6, industry_code: '0603' },
      { label: '中介服务', pid: 6, industry_code: '0604' },
      { label: '租赁服务', pid: 6, industry_code: '0605' },
    ],
    [
      { label: '广告', pid: 7, industry_code: '0700' },
      { label: '公关/市场推广/会展', pid: 7, industry_code: '0701' },
      { label: '影视/媒体/艺术/文化传播', pid: 7, industry_code: '0702' },
      { label: '文字媒体/出版', pid: 7, industry_code: '0703' },
      { label: '印刷/包装/造纸', pid: 7, industry_code: '0704' },
    ],
    [
      { label: '制药/生物工程', pid: 8, industry_code: '0800' },
      { label: '医疗/护理/卫生', pid: 8, industry_code: '0801' },
      { label: '医疗设备/器械', pid: 8, industry_code: '0802' },
    ],
    [
      { label: '贸易/进出口', pid: 9, industry_code: '0900' },
      { label: '批发/零售', pid: 9, industry_code: '0901' },
      { label: '快速消费品(食品、饮料、化妆品)', pid: 9, industry_code: '0902' },
      { label: '服装/纺织/皮革', pid: 9, industry_code: '0903' },
      { label: '家具/家电/玩具/礼品', pid: 9, industry_code: '0904' },
      { label: '奢侈品/收藏品/工艺品/珠宝', pid: 9, industry_code: '0905' },
      { label: '办公用品及设备', pid: 9, industry_code: '0906' },
      { label: '机械/设备/重工', pid: 9, industry_code: '0907' },
      { label: '汽车', pid: 9, industry_code: '0908' },
      { label: '汽车零配件', pid: 9, industry_code: '0909' },
    ],
    [
      { label: '会计/审计', pid: 10, industry_code: '1000' },
      { label: '金融/投资/证券', pid: 10, industry_code: '1001' },
      { label: '银行', pid: 10, industry_code: '1002' },
      { label: '保险', pid: 10, industry_code: '1003' },
      { label: '信托/担保/拍卖/典当', pid: 10, industry_code: '1004' },
    ],
  ],
}

export function getIndustriesName(industry_code) {
  if (!industry_code) return ''
  const pid = parseInt(industry_code.substring(0, 2))
  const id = parseInt(industry_code.substring(2, 4))
  return industries.level1[pid][id].label
}
